﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fastyou.Other.Consoles.LINQ
{
    public class LINQ2Objects
    {
        private IEnumerable<int> LinqList()
        {
            for (int i = 0; i < 12; i++)
            {
                if (i % 2 == 0)
                    yield return i;
            }
        }

        public IList<int> GetTestStr()
        {
            IList<int> result = (from q in LinqList()
                                 where q >= 4
                                 orderby q descending
                                 select q).ToList<int>();
            //IList<int> result = (LinqList()
            //    .Where(q => q > 5)
            //    .OrderByDescending(q => q)
            //    .Select(q => q)
            //    .ToList<int>());
            return result;
        }
    }
}
